
const API = require('./base')

export function getMineInfo() {
  return API.get('/wp-json/mp/v2/user/mine', {}, {
    token: true
  });
}

export  function updataUsers(args){
  return API.post('/wp-json/mp/v2/user/update', args, {
    token: true
  });
}

export function getFollow(id, page) {
  return API.get('/wp-json/mp/v2/user?type=follow&per_page=20&id=' + id + "&page=" + page,"",{token:true});
}



export function getFans(id, page) {
  return API.get('/wp-json/mp/v2/user?type=fans&per_page=20&id=' + id + "&page=" + page,"",{token:true});
}


export function updateCredits(data) {
  return API.post('/wp-json/mp/v2/credit', data, {
    token: true
  })
}

export function  getUserById(id) {
  return API.get('/wp-json/mp/v2/user/view?id=' + id,'',{token:true});
}

export function getArchive(args) {
  return API.get('/wp-json/mp/v2/credit/archive', args, {
    token: true
  })
}

export function getCredit(data) {
  return API.get('/wp-json/mp/v2/credit?per_page=20', data, {
    token: true
  })
}

export function  getFavPosts(data) {
  return API.get('/wp-json/mp/v2/comments/posts?type=fav', data, {
    token: true
  });
}

export function  getLikePosts(data) {
  return API.get('/wp-json/mp/v2/comments/posts?type=like', data, {
    token: true
  });
}